<?php

namespace app\api\validate;


use think\Validate;

class User Extends Validate{

    /**
     * 验证规则
     */
    protected $rule = [
        //'pay_password' => 'require|number|length:6',
        'pay_password' => 'number|length:6',
    ];
    /**
     * 提示消息
     */
    protected $message = [
        'pay_password.require'  =>  '支付密码不能为空',
        'pay_password.number'  =>  '支付密码只能为数字',
        'pay_password.length'  =>  '支付密码长度不正确',
    ];
    /**
     * 验证场景
     */
    protected $scene = [
        'add'  => ['pay_password'],
        'edit' => [],
    ];
}